package dq.stduy.jax.element;

import javax.xml.bind.annotation.*;
import java.util.List;

/**
 * @author dongqun
 * @version 1.0
 * @description 类的功能描述
 * @date 2019/9/26 19:05
 */
@XmlRootElement(name = "mybody")
@XmlAccessorType(XmlAccessType.FIELD)
public class MyBody {
    @XmlElement(name = "time")
    private String time;
    @XmlElement(name = "sender")
    private String sender;
    @XmlAttribute(name = "comment")
    private String note;
    @XmlElement(name = "receiver")
    private String receiver;
    @XmlElementWrapper(name = "receiver_list")
    @XmlElement(name = "receiver")
    private List<String> receivers;
    @XmlElement(name = "attach")
    private MyFile file;

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public List<String> getReceivers() {
        return receivers;
    }

    public void setReceivers(List<String> receivers) {
        this.receivers = receivers;
    }

    public MyFile getFile() {
        return file;
    }

    public void setFile(MyFile file) {
        this.file = file;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public String toString() {
        return "MyBody{" +
                "time='" + time + '\'' +
                ", sender='" + sender + '\'' +
                ", note='" + note + '\'' +
                ", receiver='" + receiver + '\'' +
                ", receivers=" + receivers +
                ", file=" + file +
                '}';
    }
}
